package matlab;

import java.util.ArrayList;
import img.info.SampleImage;
import cli.Logging;

import com.mathworks.toolbox.javabuilder.MWException;
import exception.NoDefaultAlogrithmFoundException;

public class SearchDir {

	public SearchDir() {
		
	}
	
	/**
	 * Method that calls the matlab method for searching the images
	 * @param algorithmName holds the name of the matlab algorithm (like "mat_a1" )
	 * @param imageName
	 * @param roi
	 * @param resultPath
	 */
	public static void start( String algorithmName, String imageName, int[] region, String resultPath ) {
		
		MatlabDriver matlabDriver= new MatlabDriver();
		
		try {
			/*
			 * run the matlab routine here
			 */
			System.out.println( "Start searching");

			matlabDriver.runROI( algorithmName, imageName, region, resultPath );
			System.out.println( "Finished searching" );
			/** 
			 * 
			 */
		
			
		} catch (MWException e) {
			e.printStackTrace();
		} catch (NoDefaultAlogrithmFoundException e) {
			e.printStackTrace();
		} catch ( Exception e ) {
			e.printStackTrace();
		}
		
	}
	
}
